<template>
  <view>
    <text selectable>卧槽666</text>
  </view>
  <view hover-class="green">
    666
  </view>
  <scroll-view scroll-y="true" class="scrollBox">
    <view v-for="(_, i) in 20" :key="i">{{ i }}</view>
  </scroll-view>
  <view>
    ========================
  </view>
  <Test :wc="'test'">
    <template #name="scoped">
      <view>{{scoped.obj.b}}</view>
    </template>
  </Test>
  <Test1 ref="Test1Ref" @emitValue="getEmitValue" :name="'wwwwwwc'" />
  <button @click="numAdd">父按钮操作子组件</button>
</template>

<script setup>
  import Test from './test.vue'
  import Test1 from './test1.vue'
  import {
    onMounted,
    ref
  } from "vue";

  const Test1Ref = ref(null)
  const numAdd = () => {
    Test1Ref.value.numAdd()
  }

  const getEmitValue = (v) => {
    console.log(v)
  }

  onMounted(() => {
    console.log(Test1Ref.value)
  })
</script>

<style lang="scss">
  .scrollBox {
    height: 100px;
  }

  .green {
    color: green;
  }
</style>
